#include "tree.h"

void TreeOutput::copyTreeOutput(TreeOutput *t)
{
    if (t->getParentNode() == 0) this->setVarName(t->getNodeName());
    for (uint i = 0; i < t->child_nodes.size(); i++) {
        TreeOutput *t2 = new TreeOutput(t->child_nodes[i]->token_entry.token_name, t->child_nodes[i]->token_entry.real_name, t->child_nodes[i]->token_entry.token_type, this);
        this->child_nodes.push_back(t2);
        t2->copyTreeOutput(t->child_nodes[i]);
    }
}
